﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using HWmanagementDB;

namespace HWmanagementServer
{
    [DataContract]
    public class FileModel
    {
        [DataMember]
        public int id;
        [DataMember]
        public string name;

        public static FILE toDBTable(FileModel fm)
        {
            return new FILE() { ID = fm.id, NAME = fm.name };
        }

        public static FileModel fromDBTable(FILE f)
        {
            return new FileModel() { id = f.ID, name = f.NAME };
        }
    }
}
